﻿using System.Data.Common;
using System.Data;
using Enterprise.Infrastructure.RepositoryFramework;

namespace Enterprise.Infrastructure.RepositoryFramework
{
    public class Repository : IRepository
    {
       private string _connectionString = "";
        public string ConnectionString
        {
            get { return _connectionString; }
            set { _connectionString = value; }
        }


        public int ExecuteNonQuery(DbCommand cmd)
        {
                return cmd.ExecuteNonQuery();
        }

        public IDataReader ExecuteReader(DbCommand cmd)
        {
            return ExecuteReader(cmd, CommandBehavior.Default);
        }

       public IDataReader ExecuteReader(DbCommand cmd, CommandBehavior behavior)
        {
            return cmd.ExecuteReader(behavior);
        }

        public object ExecuteScalar(DbCommand cmd)
        {
            return cmd.ExecuteScalar();
        }
    }
}
